home *** CD-ROM | disk | FTP | other *** search
/ Interactive Media Design Review 1999 / Interactive Media Design Review 1999.iso / pc / Demos / Bombardier_PC / BSCRIPTS.CST / 00021_Script_animationH-RL < prev    next >
Text File  |  1999-04-25  |  1KB  |  60 lines

  1. -- ⌐ 1998 @radical.media, inc. & Concurrent New Media Group, L.L.C.
  2. -- Developed for Bombardier, Inc.
  3. --
  4. -- All programming developed by: 
  5. -- Robert Fabricant, Valerie Valoueva, Ossi Shaked, 
  6. -- Henry Sauvageot, Chris Howell & Chris Girand
  7. --
  8. -- Use of this code by parties other than @radical.media, inc. or their
  9. --agents 
  10. -- without the express written consent of @radical.media, inc. AND Concurrent 
  11. -- New Media Group, L.L.C. is strictly prohibited.
  12. ------------------------------------------------------
  13.  
  14. on getBehaviorDescription
  15.   return "simulates 2D object movie."
  16. end
  17.  
  18. on mousedown
  19.   global oldIndex,sseq,eseq,oldH
  20.   
  21.   repeat while the mouseDown
  22.     set index = the mouseh
  23.     set curH = the mouseH
  24.     set changeH = abs(oldH - curH)
  25.     set changeV = abs(index-oldIndex)
  26.     if changeH >= changeV then
  27.       set movedHoris = TRUE
  28.     else
  29.       set movedHoris = FALSE
  30.     end if
  31.     
  32.     if movedHoris then
  33.       
  34.       if index > oldIndex +2 and oldIndex <> 0  then
  35.         if the frame > sseq then 
  36.           go to (the frame -1)
  37.         end if 
  38.       else if (index < oldIndex-2 and oldIndex <> 0) then 
  39.         if the frame < eseq then
  40.           go to (the frame +1)
  41.         end if
  42.         
  43.       end if
  44.  
  45.     end if
  46.     
  47.     updateStage
  48.     set oldIndex = index
  49.     set oldH = curH
  50.   end repeat
  51.   pass
  52. end
  53.  
  54. on mouseup 
  55.   global oldIndex,oldH
  56.   set oldIndex = 0
  57.   set oldH = 0
  58.   pass
  59. end
  60.